import request from '@/utils/request'

export const login = ({ accountNo, password }) => {

    return request.request({
        url: '/api/Login/GetToken',
        params: {
            userName: accountNo,
            userPwd: password
        },
        method: 'get'
    })
}


export const getPermissions = (accountNo) => {
    return request.request({
        url: '/api/User/GetResourceByUser',
        params: {
            accountNo: accountNo
        },
        method: 'get'
    });
}

export const getUserInfo = (accountNo) => {
    return request.request({
        url: '/api/User/GetUserInfo',
        params: {
            key: accountNo
        },
        method: 'get'
    });
}